{include file="public/header" /}


<div class="page">
    {if $joinin_detail.store_type != 1}
    <table border="0" cellpadding="0" cellspacing="0" class="ds-default-table">
        <thead>
        <tr>
            <th colspan="20">{$Think.lang.company_contact_information}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th class="w150">{$Think.lang.company_name}：</th>
            <td colspan="20">{$joinin_detail.company_name}</td>
        </tr>
        <tr>
            <th>{$Think.lang.company_location}：</th>
            <td>{$joinin_detail.company_address}</td>
            <th>{$Think.lang.company_address}：</th>
            <td>{$joinin_detail.company_address_detail}</td>
            <th>{$Think.lang.registered_capital}：</th>
            <td>{$joinin_detail.company_registered_capital}&nbsp;{$Think.lang.ten_thousand}{$Think.lang.currency_zh}
            </td>
        </tr>
        <tr>
            <th>{$Think.lang.contact_name}：</th>
            <td>{$joinin_detail.contacts_name}</td>
            <th>{$Think.lang.contact_number}：</th>
            <td>{$joinin_detail.contacts_phone}</td>
            <th>{$Think.lang.e_mail}：</th>
            <td>{$joinin_detail.contacts_email}</td>
        </tr>
        </tbody>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
        <thead>
        <tr>
            <th colspan="20">{$Think.lang.business_license_information}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th class="w150">{$Think.lang.business_license_number}：</th>
            <td>{$joinin_detail.business_licence_number}</td>
        </tr>
        <tr>

            <th>{$Think.lang.place_business_license}：</th>
            <td>{$joinin_detail.business_licence_address}</td>
        </tr>
        <tr>

            <th>{$Think.lang.validity_business_license}：</th>
            <td>{$joinin_detail.business_licence_start} - {$joinin_detail.business_licence_end}</td>
        </tr>
        <tr>
            <th>{$Think.lang.legal_scope_business}：</th>
            <td colspan="20">{$joinin_detail.business_sphere}</td>
        </tr>
        <tr>
            <th>{$Think.lang.business_license}<br/>{$Think.lang.electronic_version}：</th>
            <td colspan="20">
                {notempty name="joinin_detail.business_licence_number_electronic"}
                <a data-lightbox="lightbox-image"
                   href="{$joinin_detail.business_licence_number_electronic}">
                    <img src="{$joinin_detail.business_licence_number_electronic}" alt=""
                         height="200"/>
                </a>
                {/notempty}
            </td>
        </tr>
        </tbody>
    </table>


    <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
        <thead>
        <tr>
            <th colspan="20">{$Think.lang.settlement_account_information}：</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th class="w150">{$Think.lang.name_branch_bank}：</th>
            <td>{$joinin_detail.settlement_bank_account_name}</td>
        </tr>
        <tr>
            <th>{$Think.lang.company_bank_account}：</th>
            <td>{$joinin_detail.settlement_bank_account_number}</td>
        </tr>
        <tr>
            <th>{$Think.lang.name_branch_bank}：</th>
            <td>{$joinin_detail.settlement_bank_name}</td>
        </tr>

        <tr>
            <th>{$Think.lang.location_bank_account}：</th>
            <td>{$joinin_detail.settlement_bank_address}</td>
        </tr>
        </tbody>
    </table>

    {else /}
    <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
        <thead>
        <tr>
            <th colspan="6">{$Think.lang.store_and_contact_info}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th>{$Think.lang.company_name}：</th>
            <td>{$joinin_detail.company_name}</td>
            <th>{$Think.lang.company_location}：</th>
            <td>{$joinin_detail.company_address}</td>
            <th>{$Think.lang.company_address}：</th>
            <td>{$joinin_detail.company_address_detail}</td>
        </tr>
        <tr>
            <th>{$Think.lang.legal_person}：</th>
            <td>{$joinin_detail.legal_person}</td>
            <th>{$Think.lang.legal_person_phone}：</th>
            <td>{$joinin_detail.legal_person_phone}</td>
            <th>{$Think.lang.contact_name}：</th>
            <td>{$joinin_detail.contacts_name}</td>
        </tr>
        <tr>
            <th>{$Think.lang.contact_number}：</th>
            <td>{$joinin_detail.contacts_phone}</td>
            <th>{$Think.lang.contact_phone}：</th>
            <td>{$joinin_detail.contact_legal_phone}</td>
            <th>{$Think.lang.e_mail}：</th>
            <td>{$joinin_detail.contacts_email}</td>
        </tr>
        </tbody>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
        <thead>
        <tr>
            <th colspan="20">{$Think.lang.business_license_information}</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th class="w150">{$Think.lang.business_license_number}：</th>
            <td>{$joinin_detail.business_licence_number}</td>
        </tr>
        <tr>
            <th>{$Think.lang.place_business_license}：</th>
            <td>{$joinin_detail.business_licence_address}</td>
        </tr>
        <tr>

            <th>{$Think.lang.validity_business_license}：</th>
            <td>{$joinin_detail.business_licence_start} - {$joinin_detail.business_licence_end}</td>
        </tr>
        <tr>
            <th>{$Think.lang.legal_scope_business}：</th>
            <td colspan="20">{$joinin_detail.business_sphere}</td>
        </tr>
        <tr>
            <th>{$Think.lang.business_license}<br/>{$Think.lang.electronic_version}：</th>
            <td colspan="20">
                {notempty name="joinin_detail.business_licence_number_electronic"}
                <a data-lightbox="lightbox-image"
                   href="{$joinin_detail.business_licence_number_electronic}">
                    <img src="{$joinin_detail.business_licence_number_electronic}" alt=""
                         height="200"/>
                </a>
                {/notempty}
            </td>
        </tr>
        </tbody>
    </table>


    <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
        <thead>
        <tr>
            <th colspan="2">{$Think.lang.store_alipay_info}：</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <th>{$Think.lang.bank_account_name}：</th>
            <td>{$joinin_detail.settlement_bank_account_name}</td>
        </tr>
        <tr>
            <th>{$Think.lang.bank_account_number}：</th>
            <td>{$joinin_detail.settlement_bank_account_number}</td>
        </tr>
        <tr>
            <th>{$Think.lang.bank_name}：</th>
            <td>{$joinin_detail.settlement_bank_name}</td>
        </tr>
        <tr>
            <th>{$Think.lang.bank_address}：</th>
            <td>{$joinin_detail.settlement_bank_address}</td>
        </tr>
        </tbody>
    </table>
    {/if}
    <form id="form_store_verify" action="{:url('Wholesale/store_joinin_verify')}" method="post">
        <input id="verify_type" name="verify_type" type="hidden"/>
        <input name="member_id" type="hidden" value="{$joinin_detail.member_id}"/>
        <table border="0" cellpadding="0" cellspacing="0" class="store-joinin ds-default-table">
            <thead>
            <tr>
                <th colspan="20">{$Think.lang.store_operation_info}</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <th class="w150">{$Think.lang.ds_seller_name}：</th>
                <td>{$joinin_detail.seller_name}</td>
            </tr>
            <tr>
                <th class="w150">{$Think.lang.ds_store_name}：</th>
                <td>{$joinin_detail.store_name}</td>
            </tr>
            <tr>
                <th class="w150">{$Think.lang.store_seller_type}：</th>
                <td>{$joinin_detail.store_type_name}</td>
            </tr>
            <tr>
                <th class="w150">供应商类型：</th>
                <td>{$wholesale_class}</td>
            </tr>

            <?php if(in_array(intval($joinin_detail['joinin_state']), array(STORE_JOIN_STATE_NEW, STORE_JOIN_STATE_PAY))) { ?>
            <tr class="noborder">
                <th>审核状态：</th>
                <td class="vatop rowform onoff" style="overflow: hidden;width: auto;">
                    <label for="rewrite_enabled_1" class="cb-enable selected"
                           title="{$Think.lang.ds_yes}>"><span>通过</span></label>
                    <label for="rewrite_disabled_2" class="cb-disable"
                           title="{$Think.lang.ds_no}"><span>拒绝</span></label>
                    <input id="rewrite_enabled_1" name="verify_state" value="1" type="radio" checked="checked">
                    <input id="rewrite_disabled_2" name="verify_state" value="0" type="radio">
                </td>

            </tr>
            <tr dstype="reason" style="display: none;">
                <th>拒绝理由：</th>
                <td colspan="2"><textarea style="width: 250px;height:150px;" id="joinin_message"
                                          name="joinin_message"></textarea></td>
            </tr>
            <?php } ?>
            </tbody>
        </table>
        <?php if(in_array(intval($joinin_detail['joinin_state']), array(STORE_JOIN_STATE_NEW, STORE_JOIN_STATE_PAY))) { ?>
        <div id="validation_message" style="color:red;display:none;"></div>
        <div><a id="Submission" class="btn" href="JavaScript:void(0);"><span>提交</span></a>
        </div>
        <?php } ?>
    </form>
</div>
<link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/css/lightbox.min.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery.lightbox/js/lightbox.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('input[name="verify_state"]').click(function () {

            if ($(this).val() == 1) {
                $('tr[dstype="reason"]').hide();
            } else {
                $('tr[dstype="reason"]').show();
            }
        });
        $('#Submission').on('click', function () {
            var status = $('input:radio[name="verify_state"]:checked').val();
            if (status != 1){
                if ($('#joinin_message').val() == '') {
                    layer.msg('请填写拒绝理由');
                    return false;
                }
            }
            $('#form_store_verify').submit();
        });

    });
</script>